package ai.attackControllers;

import com.jme.math.Vector3f;

import logic.common.player.Player;
import logic.nodes.TeamNode;
import logic.ships.hunter.Hunter;
import logic.weapons.WeaponType;

public class EasyAttackController extends AttackController {
	
	private static final long serialVersionUID = 1L;
	
	private static final int IN_ACC = 7;
	
	public EasyAttackController(Player bot) {
		super(bot);
	}
	
	@Override
	protected void fireWeapons(Hunter hunter, TeamNode target) {
		Vector3f hunterLoc = hunter.getLocalTranslation();
		Vector3f targetLoc = target.getLocalTranslation();
		Vector3f targetDirection = targetLoc.add(getRandomVector(0, IN_ACC)).subtract(hunterLoc);
		
		hunter.fireWeapons(targetDirection, WeaponType.Energy);
	}
}